<template>
  <div class="total-container" :class="type === 1 ? 'right-bg' : 'left-bg'">
    <span class="total-icon-view">
      <slot name="icon"></slot>
    </span>
    <span class="total-value-view">
      <slot/>
    </span>
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  type: {
    type: Number,
    default: 0
  }
})

</script>

<style lang="less" scoped>
.left-bg {
  background: url("@/assets/bi/technology/statistics-bg.png")
}

.right-bg {
  background: url("@/assets/bi/technology/emission-bg.png")
}

.total-container {
  background-size: 100% 100%;
  width: 100%;
  height: 30px;
  font-size: 14px;
  display: flex;
  align-items: center;

  .total-icon-view {
    margin: 4px 8px 0 5px;
  }

  .total-value-view {
    white-space: nowrap;
  }
}
</style>
